﻿using System;

namespace Microsoft.Xna.Framework.Audio
{
	/// <summary>
	/// 
	/// </summary>
    public class AudioEmitter
    {
		internal float _DopplerScale;

		#region Properties
		/// <summary>
        /// Gets or sets a scalar applied to the level of Doppler effect calculated between this and any AudioListener.
        /// </summary>
        public float DopplerScale
        {
            get { return _DopplerScale; }
			set
			{
				if (value < 0f)
				{
					throw new ArgumentOutOfRangeException("value", FrameworkResources.InvalidEmitterDopplerScale);
				}
				this._DopplerScale = value;
			}
        }

        /// <summary>
        /// Gets or sets the forward orientation vector for this emitter.
        /// </summary>
		public Vector3 Forward { get; set; }

        /// <summary>
        /// Gets or sets the position of this emitter.
        /// </summary>
		public Vector3 Position { get; set; }

        /// <summary>
        /// Gets or sets the upward orientation vector for this emitter.
        /// </summary>
		public Vector3 Up { get; set; }

        /// <summary>
        /// Gets or sets the velocity vector of this emitter.
        /// </summary>
		public Vector3 Velocity { get; set; }
		#endregion

		/// <summary>
		/// Initializes a new instance of this class.
		/// </summary>
		public AudioEmitter()
		{
			this._DopplerScale = 1f;
			this.Forward = new Vector3(0, 0, 1);
			this.Up = Vector3.Up;
			this.Position = Vector3.Zero;
			this.Velocity = Vector3.Zero;
		}
    }
}
